package com.youkeyi.ddy.cloud.common.api.application.system.corp;

import com.youkeyi.ddy.cloud.common.api.application.system.corp.dto.SystemCorpSortListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.system.corp.param.SystemCorpSortListCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.system.corp.param.SystemCorpSortUpdateCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 关联主体排序
 *
 * @Corpor liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【SYSTEM】corp management"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-SYSTEM", fallback = SystemCorpSortCloudServiceFallback.class)
@RequestMapping("/system/corp/sort")
public interface SystemCorpSortCloudService {

    // 查询主体列表
    @ApiOperation(value = "Query Mapping Corp Sort List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.corp.SystemCorpCloudService.list")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = SystemCorpSortListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query Mapping Corp Sort List", dataType = "SystemCorpListCloudParam", dataTypeClass = SystemCorpSortListCloudParam.class),
    })
    @GetMapping
    public abstract SystemCorpSortListCloudDto list(SystemCorpSortListCloudParam param);


    // 编辑主体
    @ApiOperation(value = "Update Mapping Corp Sort", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.corp.SystemCorpCloudService.update")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Update Mapping Corp Sort", dataType = "SystemCorpUpdateCloudParam", dataTypeClass = SystemCorpSortUpdateCloudParam.class),
    })
    @PatchMapping("update")
    public abstract ResponseContent update(@RequestBody SystemCorpSortUpdateCloudParam param);

}
